;
(function() {

	module.exports = {
		prefix: "/bus/ticket_factory",
		get: {
			"/list": function() {
				var bus = role.getBus(this);
				var ticket_factory_list = bus.getTicketFactoryList();
				this.body = ResponObj("json", ticket_factory_list);
			},
			"/by_id/:ticket_factory_id": function() {
				var bus = role.getBus(this);
				var ticket_factory_id = this.params.ticket_factory_id;
				var ticket_factory = bus._getTicketFactory(ticket_factory_id);
				this.body = ResponObj("json", ticket_factory);
			}
		},
		post: {
			"/add_ticket_factory": function() {
				var bus = role.getBus(this);
				var ticket_factory_info = this.request.body;

				var ticket_factory = bus.addTicketFactory(ticket_factory_info);
				this.body = ResponObj("json", ticket_factory);
			}
		},
		"delete": {
			"/remove_ticket_factory/:ticket_factory_id": function() {
				var bus = role.getBus(this);
				var ticket_factory_id = this.params.ticket_factory_id;
				bus.removeTicketFactory(ticket_factory_id);
				this.body = ResponObj("json", bus.getTicketFactoryList());
			}
		}
	}
	var role = require("./role");
	var BusCon = require("../../core/bus/_con");
	var UserCon = require("../../core/user/_con");
	var GoodsCon = require("../../core/goods/_con");
	var AchCon = require("../../core/ach/_con");
	var db = require("../../core/db/index");
	var config = require("../../core/_include/config");
	var ResponObj = require("../_include/responObj");
}());